﻿using System.ComponentModel;

namespace AntdUI_HamburgerMenuTabs.Forms
{
    public partial class Sub : AntdUI.Window
    {
        public Sub()
        {
            InitializeComponent();

            this.InitTheme();

            table1.Columns = [
                new AntdUI.Column("Col1", "Col1").SetAligns(),
                new AntdUI.Column("Col2", "Col2").SetAligns(),
                new AntdUI.Column("Col3", "Col3").SetAligns(),
            ];

            BindingList<Model> data = [];

            for (int i = 0; i < 100; i++)
            {
                data.Add(new Model($"Col1-{i:000}", $"Col2-{i:000}", $"Col3-{i:000}"));
            }

            table1.Binding(data);
        }

        class Model(string col1, string col2, string col3)
        {
            public string Col1 { get; set; } = col1;
            public string Col2 { get; set; } = col2;
            public string Col3 { get; set; } = col3;
        }
    }
}